Telegram Group & Telegram Channel
Статические методы

Отличие статического метода от обычного метода класса в том, что первый привязан к классу, а не объекту.

Такой тип методов по умолчанию не принимает ни объект, ни класс – прописывать self или cls в аргументах не нужно. То есть статические методы не могут модифицировать ни объект, ни сам класс.

Обычную функцию стоит вносить в класс в качестве статического метода в том случае, когда эта функция логически относится к классу и имеет смысл там быть.

Подписывайтесь на канал 👉@pythonofff



tg-me.com/pythonofff/2973
Create:
Last Update:

Статические методы

Отличие статического метода от обычного метода класса в том, что первый привязан к классу, а не объекту.

Такой тип методов по умолчанию не принимает ни объект, ни класс – прописывать self или cls в аргументах не нужно. То есть статические методы не могут модифицировать ни объект, ни сам класс.

Обычную функцию стоит вносить в класс в качестве статического метода в том случае, когда эта функция логически относится к классу и имеет смысл там быть.

Подписывайтесь на канал 👉@pythonofff

BY Python академия




Share with your friend now:
tg-me.com/pythonofff/2973

View MORE
Open in Telegram


Python академия Telegram | DID YOU KNOW?

Date: |

The global forecast for the Asian markets is murky following recent volatility, with crude oil prices providing support in what has been an otherwise tough month. The European markets were down and the U.S. bourses were mixed and flat and the Asian markets figure to split the difference.The TSE finished modestly lower on Friday following losses from the financial shares and property stocks.For the day, the index sank 15.09 points or 0.49 percent to finish at 3,061.35 after trading between 3,057.84 and 3,089.78. Volume was 1.39 billion shares worth 1.30 billion Singapore dollars. There were 285 decliners and 184 gainers.

How to Buy Bitcoin?

Most people buy Bitcoin via exchanges, such as Coinbase. Exchanges allow you to buy, sell and hold cryptocurrency, and setting up an account is similar to opening a brokerage account—you’ll need to verify your identity and provide some kind of funding source, such as a bank account or debit card. Major exchanges include Coinbase, Kraken, and Gemini. You can also buy Bitcoin at a broker like Robinhood. Regardless of where you buy your Bitcoin, you’ll need a digital wallet in which to store it. This might be what’s called a hot wallet or a cold wallet. A hot wallet (also called an online wallet) is stored by an exchange or a provider in the cloud. Providers of online wallets include Exodus, Electrum and Mycelium. A cold wallet (or mobile wallet) is an offline device used to store Bitcoin and is not connected to the Internet. Some mobile wallet options include Trezor and Ledger.

Python академия from kr


Telegram Python академия
FROM USA